import styled from 'styled-components';
import logoPic from '../../statics/logo.png';

export const HeaderWrapper = styled.div`
    height: 56px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
`;

export const Logo = styled.a.attrs({
    href: '/'
})`
    height: 56px;
    position: absolute;
    width: 100px;
    display: block;
    margin-left: 250px;
    background: url(${logoPic});
    background-size: contain;
    border-bottom: 1px solid #f0f0f0;
`;

export const Nav = styled.div`
    width: 960px;
    height: 100%;
    margin 0 auto;
    // background: green;
`;

export const NavItem = styled.div`
    line-height: 56px;
    padding: 0 15px;
    font-size: 17px;
    color: #333;
    &.left {
      float: left;
    }
    &.right {
      float: right;
    }
    &.active {
      color: #ea6f5a;
    }
    &.focused {
		width: 240px;
	}
	&.slide-enter {
		transition: all .5s ease-out;
	}
	&.slide-enter-active {
		width: 240px;
	}
	&.slide-exit {
		transition: all .5s ease-out;
	}
	&.slide-exit-active {
		width: 160px;
	}
`;

export const NavSearch = styled.input.attrs({
    placeholder: '搜索'
})`
    width: 160px;
    height: 38px;
    padding: 0 30px 0 20px;
    margin-top: 9px;
    margin-left: 20px;
    box-sizing: border-box;
    border: none;
    outline: none;
    background: #eee;
    border-radius: 19px;
    // padding: 0 20px;
    font-size: 14px;
    color: #666;
    &::placeholder {
      color: #999; 
    }
    &.focused {
      width: 200px;
    }
`;

export const SearchInfo = styled.div`
    position: absolute;
    left: 0;
    top: 56px;
    width: 240px;
    padding: 0 20px;
    // background: green;
    height: 100px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
`;

export const SearchInfoTitle = styled.div`
    margin-top: 20px;
    margin-bottom: 15px;
    line-height: 20px;
    font-size: 14px;
    color: #969696;
`;

export const SearchInfoSwitch = styled.span`
    float: right;
    font-size: 12px;
`;

export const SearchInfoItem = styled.a`
    font-size: 12px;
    line-height: 20px;
    float: left;
    display: block;
    padding: 0 5px;
    font-size: 12px;
    border: 1px solid #ddd;
    color: #969696;
    border-radius: 2px;
`;

export const Addition = styled.div`
    position: absolute;
    margin-right: 250px;
    right: 0;
    top: 0;
    height: 56px;
`;

export const Button = styled.div`
    float: right;
    margin-top: 9px;
    margin-right: 20px;
    padding: 0 20px
    line-height: 38px;
    border-radius: 19px;
    border: 1px solid #ec6149;
    font-size: 14px;
    &.reg{
      color: #ec6149;
    }
    &.writing{
      color: #fff;
      background: #ec6149;
    }
`;

export const SearchWrapper = styled.div`
    position: relative;
    float: left;
    
    .iconfont{
      position: absolute;
      right: 5px;
      bottom: 5px;
      // background: green;
      width: 30px;
      line-height: 30px;
      border-radius: 15px;
      text-align: center;
      &.focused{
        background: #777;
        color: #fff;
      }
    }
`;